<?php
/**
 * Created by PhpStorm.
 * User: hebidu
 * Date: 15/12/3
 * Time: 11:14
 */

namespace Test\Controller;

use Common\Api\BoyeServiceApi;
use Admin\Model\SecurityCodeModel;

class TestMessageBoxController extends TestController{


    public function index(){

        $this->display();
    }

    public function query(){
        if(IS_POST){

            $data = array(
                'uid'=> I('post.uid',''),
                'msg_type' => I('post.msg_type',''),
                'start_time'=>I('post.start_time',''),
                'api_ver'=>$this->api_ver,
                'notify_id'=>$this->notify_id,
                'type'=>'BY_Message_query',
                'alg'=>'md5',
            );

            $service = new BoyeServiceApi();
            header('Content-type:text/html;charset=utf-8');
            $result = $service->callRemote("",$data,true);
            // dump($result);exit;

            $this->parseResult($result);

        }

        $this->display();
    }

    private function parseResult($result){

        echo "解密后数据：";
        dump($result);
    }


}